/* 全局样式 */
.App {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  font-family: 'Arial', sans-serif;
}

/* 头部样式 */
.App-header {
  background-color: #282c34;
  padding: 20px;
  color: white;
  border-radius: 8px 8px 0 0;
  margin-bottom: 20px;
}

.App-header h1 {
  margin: 0;
  font-size: 2rem;
}

/* 主内容区域 */
.App-main {
  background-color: #f5f5f5;
  border-radius: 0 0 8px 8px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 表单样式 */
.todo-form {
  display: flex;
  margin-bottom: 20px;
}

.todo-input {
  flex: 1;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px 0 0 4px;
  font-size: 1rem;
}

.todo-button {
  padding: 12px 20px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s;
}

.todo-button:hover {
  background-color: #45a049;
}

/* 待办事项列表 */
.todo-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.todo-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  margin-bottom: 10px;
  background-color: white;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
}

.todo-item:hover {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.todo-content {
  display: flex;
  align-items: center;
  flex: 1;
}

.todo-checkbox {
  margin-right: 10px;
  transform: scale(1.2);
  cursor: pointer;
}

.todo-text {
  font-size: 1.1rem;
  text-align: left;
  word-break: break-word;
}

/* 已完成的待办事项样式 */
.todo-item.completed .todo-text {
  text-decoration: line-through;
  color: #888;
}

/* 删除按钮 */
.delete-button {
  background-color: #f44336;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.delete-button:hover {
  background-color: #d32f2f;
}

/* 错误消息 */
.error-message {
  background-color: #ffebee;
  color: #c62828;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 20px;
  text-align: left;
}

/* 加载状态 */
.loading {
  padding: 20px;
  text-align: center;
  color: #666;
  font-style: italic;
}

/* 空列表消息 */
.empty-message {
  padding: 20px;
  text-align: center;
  color: #666;
  font-style: italic;
  background-color: white;
  border-radius: 4px;
}

/* 响应式设计 */
@media (max-width: 600px) {
  .App {
    padding: 10px;
  }
  
  .todo-form {
    flex-direction: column;
  }
  
  .todo-input {
    border-radius: 4px;
    margin-bottom: 10px;
  }
  
  .todo-button {
    border-radius: 4px;
  }
}
